[CSS] style input tag

Posted by nosferat on Stack Overflow See other posts from Stack Overflow or by nosferat
Published on 2010-06-16T11:05:38Z Indexed on 2010/06/16 11:22 UTC
Read the original article Hit count: 211

Filed under:
|

Hi! ASP.Net has a tag called CheckboxList. The output of this tag looks like this:

<table class="checkbox">
<tbody>
<tr>
    <td>
        <input id="/*longdynamicstring1*/" type="checkbox" name="/*longdynamicstring2*/" />
        <label for="/*longdynamicstring1*/">Label Text</label>
    </td>
</tr>
</tbody>
</table>

I want to position the label and the input but I cannot find out how. Tried the following:

.checkbox input{
padding-right: 5px;
}

and

.checkbox input[type='checkbox']
{
    padding-right: 5px;
}

but neither of them had any effect. Because it's ASP I cannot set a class for the input elements and I cannot reference the id because it's dynamic.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about css